<?php
class categoriesPreviewWidgetComponents extends myComponents{
	
	public function executeRender(){
		
		$q = Doctrine_Query::create()
				->from('ProductGroup pg')
				->innerJoin('pg.StructureProductGroup  spg')
				->innerJoin('pg.Translation pgt WITH pgt.lang = ?', $this->getUser()->getCulture())
				->where('spg.structure_id = ?', $this->getObject()->getId());

		$this->node = $this->getObject();
		$this->productGroups = $q->execute();
	}
}